#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

struct node {
	ll to;
	ll nxt;
} e[200100];

ll n, m, q, ans, sum, tot;
ll a[410];
ll bel[410];
ll head[1100];
ll dis[310][310];
ll f[16400][16][16];
ll s[16400][16];
bool b[410];
bool sub1, sub2;

void add(ll u, ll v) {
	tot++;
	e[tot].to = v;
	e[tot].nxt = head[u];
	head[u] = tot;
	return;
}

bool find(ll x) {
	for (ll i = head[x]; i != 0; i = e[i].nxt) {
		ll v = e[i].to;
		if (!b[v]) {
			b[v] = 1;
			if (!bel[v] || find(bel[v])) {
				bel[v] = x;
				return 1;
			}
		}
	}
	return 0;
}

int main() {
	freopen("journey.in", "r", stdin);
	freopen("journey.out", "w", stdout);
	scanf("%lld%lld%lld", &n, &m, &q);
	if (!q) {
		return 0;
	}
	if (n <= 14) {
		for (ll i = 1; i <= n; i++) {
			for (ll j = 1; j <= n; j++) {
				dis[i][j] = 1e18;
			}
		}
		for (ll i = 1; i <= m; i++) {
			ll u, v, w;
			scanf("%lld%lld%lld", &u, &v, &w);
			dis[u][v] = min(dis[u][v], w);
		}
		for (ll i = 0; i <= (1 << n); i++) {
			for (ll j = 0; j <= n; j++) {
				for (ll k = 0; k <= n; k++) {
					f[i][j][k] = 1e18;
				}
			}
		}
		for (ll i = 1; i <= n; i++) {
			for (ll j = 1; j <= n; j++) {
				f[(1 << (i - 1)) | (1 << (j - 1))][j][i] = dis[i][j];
			}
		}
		for (ll i = 0; i < (1 << n); i++) {
			for (ll j = 1; j <= n; j++) {
				for (ll k = 1; k <= n; k++) {
					for (ll l = 1; l <= n; l++) {
						f[i | (1 << (l - 1))][l][k] = min(f[i | (1 << (l - 1))][l][k], f[i][j][k] + dis[j][l]);
					}
				}
			}
		}
		for (ll i = 0; i < (1 << n); i++) {
			for (ll j = 0; j <= n; j++) {
				s[i][j] = 1e18;
			}
			for (ll j = 1; j <= n; j++) {
				for (ll k = 1; k <= n; k++) {
					if (j == k) {
						s[i][0] = min(s[i][0], f[i][j][k]);
					} else {
						s[i][1] = min(s[i][1], f[i][j][k]);
					}
				}
			}
		}
		for (ll i = 1; i <= n; i++) {
			s[(1 << (i - 1))][1] = 0;
		}
		for (ll i = 0; i < (1 << n); i++) {
			for (ll j = 0; j < (1 << n); j++) {
				for (ll k = 0; k <= n; k++) {
					for (ll l = 0; l + k <= n; l++) {
						s[i | j][k + l] = min(s[i | j][k + l], s[i][k] + s[j][l]);
					}
				}
			}
		}
		while (q--) {
			ll x;
			ans = 1e18;
			scanf("%lld", &x);
			for (ll i = 0; i <= n; i++) {
				ans = min(ans, i * x + s[(1 << n) - 1][i]);
			}
			printf("%lld\n", ans);
		}
		return 0;
	}
	sub1 = sub2 = 1;
	for (ll i = 1; i <= m; i++) {
		ll u, v, w;
		scanf("%lld%lld%lld", &u, &v, &w);
		add(u, v);
		a[i] = w;
		if (u != i || v != i + 1) {
			sub1 = 0;
		}
		if (u != i || v != i % n + 1) {
			sub2 = 0;
		}
	}
	if (sub1) {
		while (q--) {
			ll x;
			scanf("%lld", &x);
			ans = x;
			for (ll i = 2; i <= n; i++) {
				ans += min(x, a[i - 1]);
			}
			printf("%lld\n", ans);
		}
		return 0;
	}
	if (sub2) {
		for (ll i = 1; i <= m; i++) {
			sum += a[i];
		}
		while (q--) {
			ll x;
			scanf("%lld", &x);
			ans = 0;
			for (ll i = 1; i <= n; i++) {
				ans += min(x, a[(i - 2 + n) % n + 1]);
			}
			printf("%lld\n", min(ans, sum));
		}
		return 0;
	}
	for (ll i = 1; i <= n; i++) {
		for (ll j = 1; j <= n; j++) {
			b[j] = 0;
		}
		if (!find(i)) {
			ans++;
		}
	}
	while (q--) {
		ll x;
		scanf("%lld", &x);
		printf("%lld\n", ans * x);
	}
	return 0;
}
